package edu.gatech.cs2340.teamrocket.view;

import java.awt.image.BufferedImage;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

public class MapFrame extends JFrame {

	public MapFrame(VisualMap theMap){
		
		setTitle("Your GPS");
		setBounds(100, 100, 800, 600);
		setResizable(false);
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		BufferedImage theVisualMap = theMap.getVisualMap();
		JLabel aLabel = new JLabel(new ImageIcon( theVisualMap ));
		
		JPanel mainPanel = new JPanel();
		mainPanel.add(aLabel);
		JScrollPane scrollPane = new JScrollPane(mainPanel);
		add(scrollPane);
		setVisible(true);
		
	}

}
